/* Copyright (c) 2010 OFXKit
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#import <Foundation/Foundation.h>

#import "OFXCurrency.h"
#import "OFXInvestmentAccount.h"
#import "OFXInvestmentTransaction.h"
#import "OFXInvestmentIncomeTransaction.h"
#import "OFXSecurity.h"

@interface OFXReinvestTransaction : OFXInvestmentTransaction {
  OFXSecurity* security;
  NSString* incomeType;
  NSNumber* totalAmount;
  NSString* securitySubAccount;
  NSNumber* units;
  NSNumber* unitPrice;
  NSNumber* commission;
  NSNumber* taxes;
  NSNumber* fees;
  NSNumber* load;
  bool taxExempt;
  OFXCurrency* originalCurrency;
}

/**
 * @property security
 * @brief Underlying security.
 */
@property(retain) OFXSecurity* security;

/**
 * @property incomeType
 * @brief Type of investment income.
 *
 * Valid values:
 * - CGLONG: capital gains-long term
 * - CGSHORT: capital gains-short term
 * - DIV: dividend
 * - INTEREST
 * - MISC
 */
@property(retain) NSString* incomeType;

/**
 * @property totalAmount
 * @brief Total amount of transaction.
 */
@property(retain) NSNumber* totalAmount;

/**
 * @property securitySubAccount
 * @brief Sub-account that security is from.
 * 
 * Valid values: 
 * - CASH
 * - MARGIN
 * - SHORT
 * - OTHER
 */
@property(retain) NSString* securitySubAccount;

/**
 * @property units
 * @brief Number of units involved in transaction. 
 */
@property(retain) NSNumber* units;

/**
 * @property unitPrice
 * @brief Unit price.
 */
@property(retain) NSNumber* unitPrice;

/**
 * @property commission
 * @brief Commission charged in transaction.
 */
@property(retain) NSNumber* commission;

/**
 * @property taxes
 * @brief Taxes charged in transaction.
 */
@property(retain) NSNumber* taxes;

/**
 * @property fees
 * @brief Other fees charged in transaction.
 */
@property(retain) NSNumber* fees;

/**
 * @property load
 * @brief Load applied to transaction.
 */
@property(retain) NSNumber* load;

/**
 * @property taxExempt
 * @brief Indicates if the transaction is tax exempt.
 */
@property(assign) bool taxExempt;

/**
 * @property originalCurrency
 * @brief Original currency of transaction.
 */
@property(retain) OFXCurrency* originalCurrency;

@end
